package com.situ.mall.controller;

import com.situ.mall.pojo.Role;
import com.situ.mall.service.IRoleService;
import com.situ.mall.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/role")
public class RoleController {
    @Autowired
    private IRoleService roleService;

    @RequestMapping("/selectRole")
    @ResponseBody
    public Result selectRole() {
        List<Role> list = roleService.selectRole();
        return Result.ok(list);
    }
}
